﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SlamDunk.CMS.Model
{	
    /// <summary>
    /// Message视图模型类
    /// </summary>
	[Serializable]
	public class MessageView
	{	
        #region 01.属性——Id
        /// <summary>
        /// 属性——Id
        /// </summary>
		public int Id { get; set; }
        #endregion
        
        #region 02.属性——Title
        /// <summary>
        /// 属性——Title
        /// </summary>
		public string Title { get; set; }
        #endregion
        
        #region 03.属性——Content
        /// <summary>
        /// 属性——Content
        /// </summary>
		public string Content { get; set; }
        #endregion
        
        #region 04.属性——ContractName
        /// <summary>
        /// 属性——ContractName
        /// </summary>
		public string ContractName { get; set; }
        #endregion
        
        #region 05.属性——ContractPhone
        /// <summary>
        /// 属性——ContractPhone
        /// </summary>
		public string ContractPhone { get; set; }
        #endregion
        
        #region 06.属性——ContractQQ
        /// <summary>
        /// 属性——ContractQQ
        /// </summary>
		public string ContractQQ { get; set; }
        #endregion
        
        #region 07.属性——ContractEmail
        /// <summary>
        /// 属性——ContractEmail
        /// </summary>
		public string ContractEmail { get; set; }
        #endregion
        
        #region 08.属性——AddTime
        /// <summary>
        /// 属性——AddTime
        /// </summary>
		public string AddTime { get; set; }
        #endregion
        
        #region 09.方法——转换为数据模型
        /// <summary>
        /// 转换为数据模型
        /// </summary>
        /// <returns>Message数据模型对象</returns>
        public Model.Message ToDataModel()
        {
            return new Model.Message()
            {
                Id = this.Id,
                Title = this.Title,
                Content = this.Content,
                ContractName = this.ContractName,
                ContractPhone = this.ContractPhone,
                ContractQQ = this.ContractQQ,
                ContractEmail = this.ContractEmail,
                DelFlag=false,
                AddTime = DateTime.Now,
            };
        }
        #endregion
	}
}
